\(\int \coth (c+d x) (a+b \tanh ^2(c+d x))^3 \, dx\) [161]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 72 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {(a+b)^3 \log (\cosh (c+d x))}{d}+\frac {a^3 \log (\tanh (c+d x))}{d}-\frac {b^2 (3 a+b) \tanh ^2(c+d x)}{2 d}-\frac {b^3 \tanh ^4(c+d x)}{4 d} \]

[Out]

(a+b)^3*ln(cosh(d*x+c))/d+a^3*ln(tanh(d*x+c))/d-1/2*b^2*(3*a+b)*tanh(d*x+c)^2/d-1/4*b^3*tanh(d*x+c)^4/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3751, 457, 84} \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {a^3 \log (\tanh (c+d x))}{d}-\frac {b^2 (3 a+b) \tanh ^2(c+d x)}{2 d}+\frac {(a+b)^3 \log (\cosh (c+d x))}{d}-\frac {b^3 \tanh ^4(c+d x)}{4 d} \]

[In]

Int[Coth[c + d*x]*(a + b*Tanh[c + d*x]^2)^3,x]

[Out]

((a + b)^3*Log[Cosh[c + d*x]])/d + (a^3*Log[Tanh[c + d*x]])/d - (b^2*(3*a + b)*Tanh[c + d*x]^2)/(2*d) - (b^3*T
anh[c + d*x]^4)/(4*d)

Rule 84

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^3}{x \left (1-x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \frac {(a+b x)^3}{(1-x) x} \, dx,x,\tanh ^2(c+d x)\right )}{2 d} \\ & = \frac {\text {Subst}\left (\int \left (-b^2 (3 a+b)-\frac {(a+b)^3}{-1+x}+\frac {a^3}{x}-b^3 x\right ) \, dx,x,\tanh ^2(c+d x)\right )}{2 d} \\ & = \frac {(a+b)^3 \log (\cosh (c+d x))}{d}+\frac {a^3 \log (\tanh (c+d x))}{d}-\frac {b^2 (3 a+b) \tanh ^2(c+d x)}{2 d}-\frac {b^3 \tanh ^4(c+d x)}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.62 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.93 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {2 (a+b)^3 \log (\cosh (c+d x))+2 a^3 \log (\tanh (c+d x))-b^2 (3 a+b) \tanh ^2(c+d x)-\frac {1}{2} b^3 \tanh ^4(c+d x)}{2 d} \]

[In]

Integrate[Coth[c + d*x]*(a + b*Tanh[c + d*x]^2)^3,x]

[Out]

(2*(a + b)^3*Log[Cosh[c + d*x]] + 2*a^3*Log[Tanh[c + d*x]] - b^2*(3*a + b)*Tanh[c + d*x]^2 - (b^3*Tanh[c + d*x
]^4)/2)/(2*d)

Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.11

method result size
parallelrisch \(\frac {-4 \left (a +b \right )^{3} \ln \left (1-\tanh \left (d x +c \right )\right )+4 a^{3} \ln \left (\tanh \left (d x +c \right )\right )-b^{3} \tanh \left (d x +c \right )^{4}+\left (-6 a \,b^{2}-2 b^{3}\right ) \tanh \left (d x +c \right )^{2}-4 d x \left (a +b \right )^{3}}{4 d}\) \(80\)
derivativedivides \(-\frac {\frac {b^{3} \tanh \left (d x +c \right )^{4}}{4}+\frac {3 a \,b^{2} \tanh \left (d x +c \right )^{2}}{2}+\frac {b^{3} \tanh \left (d x +c \right )^{2}}{2}+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (\tanh \left (d x +c \right )+1\right )-a^{3} \ln \left (\tanh \left (d x +c \right )\right )+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (\tanh \left (d x +c \right )-1\right )}{d}\) \(125\)
default \(-\frac {\frac {b^{3} \tanh \left (d x +c \right )^{4}}{4}+\frac {3 a \,b^{2} \tanh \left (d x +c \right )^{2}}{2}+\frac {b^{3} \tanh \left (d x +c \right )^{2}}{2}+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (\tanh \left (d x +c \right )+1\right )-a^{3} \ln \left (\tanh \left (d x +c \right )\right )+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (\tanh \left (d x +c \right )-1\right )}{d}\) \(125\)
risch \(-a^{3} x -3 b \,a^{2} x -3 a \,b^{2} x -b^{3} x -\frac {6 b c \,a^{2}}{d}-\frac {6 a \,b^{2} c}{d}-\frac {2 b^{3} c}{d}-\frac {2 a^{3} c}{d}+\frac {2 b^{2} {\mathrm e}^{2 d x +2 c} \left (3 a \,{\mathrm e}^{4 d x +4 c}+2 b \,{\mathrm e}^{4 d x +4 c}+6 \,{\mathrm e}^{2 d x +2 c} a +2 b \,{\mathrm e}^{2 d x +2 c}+3 a +2 b \right )}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{4}}+\frac {3 b \ln \left ({\mathrm e}^{2 d x +2 c}+1\right ) a^{2}}{d}+\frac {3 \ln \left ({\mathrm e}^{2 d x +2 c}+1\right ) a \,b^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+1\right )}{d}+\frac {a^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}\) \(231\)

[In]

int(coth(d*x+c)*(a+b*tanh(d*x+c)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/4*(-4*(a+b)^3*ln(1-tanh(d*x+c))+4*a^3*ln(tanh(d*x+c))-b^3*tanh(d*x+c)^4+(-6*a*b^2-2*b^3)*tanh(d*x+c)^2-4*d*x
*(a+b)^3)/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2381 vs. \(2 (68) = 136\).

Time = 0.29 (sec) , antiderivative size = 2381, normalized size of antiderivative = 33.07 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\text {Too large to display} \]

[In]

integrate(coth(d*x+c)*(a+b*tanh(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

-((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*cosh(d*x + c)^8 + 8*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*cosh(d*x + c)*si
nh(d*x + c)^7 + (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*sinh(d*x + c)^8 - 2*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b +
3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^6 + 2*(14*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*cosh(d*x + c)^2 - 3*a*b^2 - 2*
b^3 + 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*sinh(d*x + c)^6 + 4*(14*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*cosh(
d*x + c)^3 - 3*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c))*sinh(d*x + c)^5 - 2*(6
*a*b^2 + 2*b^3 - 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^4 + 2*(35*(a^3 + 3*a^2*b + 3*a*b^2 + b^3
)*d*x*cosh(d*x + c)^4 - 6*a*b^2 - 2*b^3 + 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x - 15*(3*a*b^2 + 2*b^3 - 2*(a^3
 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^2)*sinh(d*x + c)^4 + 8*(7*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*c
osh(d*x + c)^5 - 5*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^3 - (6*a*b^2 + 2*b^
3 - 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c))*sinh(d*x + c)^3 + (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*
x - 2*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^2 + 2*(14*(a^3 + 3*a^2*b + 3*a*b
^2 + b^3)*d*x*cosh(d*x + c)^6 - 15*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^4 -
 3*a*b^2 - 2*b^3 + 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x - 6*(6*a*b^2 + 2*b^3 - 3*(a^3 + 3*a^2*b + 3*a*b^2 + b
^3)*d*x)*cosh(d*x + c)^2)*sinh(d*x + c)^2 - ((3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^8 + 8*(3*a^2*b + 3*a*b^2
+ b^3)*cosh(d*x + c)*sinh(d*x + c)^7 + (3*a^2*b + 3*a*b^2 + b^3)*sinh(d*x + c)^8 + 4*(3*a^2*b + 3*a*b^2 + b^3)
*cosh(d*x + c)^6 + 4*(3*a^2*b + 3*a*b^2 + b^3 + 7*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^6 +
 8*(7*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^3 + 3*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c))*sinh(d*x + c)^5 +
 6*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^4 + 2*(35*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^4 + 9*a^2*b + 9*a
*b^2 + 3*b^3 + 30*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^4 + 8*(7*(3*a^2*b + 3*a*b^2 + b^3)*
cosh(d*x + c)^5 + 10*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^3 + 3*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c))*si
nh(d*x + c)^3 + 3*a^2*b + 3*a*b^2 + b^3 + 4*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^2 + 4*(7*(3*a^2*b + 3*a*b^
2 + b^3)*cosh(d*x + c)^6 + 15*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^4 + 3*a^2*b + 3*a*b^2 + b^3 + 9*(3*a^2*b
 + 3*a*b^2 + b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + 8*((3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^7 + 3*(3*a^2*b
 + 3*a*b^2 + b^3)*cosh(d*x + c)^5 + 3*(3*a^2*b + 3*a*b^2 + b^3)*cosh(d*x + c)^3 + (3*a^2*b + 3*a*b^2 + b^3)*co
sh(d*x + c))*sinh(d*x + c))*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) - (a^3*cosh(d*x + c)^8 + 8*a^
3*cosh(d*x + c)*sinh(d*x + c)^7 + a^3*sinh(d*x + c)^8 + 4*a^3*cosh(d*x + c)^6 + 6*a^3*cosh(d*x + c)^4 + 4*(7*a
^3*cosh(d*x + c)^2 + a^3)*sinh(d*x + c)^6 + 8*(7*a^3*cosh(d*x + c)^3 + 3*a^3*cosh(d*x + c))*sinh(d*x + c)^5 +
4*a^3*cosh(d*x + c)^2 + 2*(35*a^3*cosh(d*x + c)^4 + 30*a^3*cosh(d*x + c)^2 + 3*a^3)*sinh(d*x + c)^4 + 8*(7*a^3
*cosh(d*x + c)^5 + 10*a^3*cosh(d*x + c)^3 + 3*a^3*cosh(d*x + c))*sinh(d*x + c)^3 + a^3 + 4*(7*a^3*cosh(d*x + c
)^6 + 15*a^3*cosh(d*x + c)^4 + 9*a^3*cosh(d*x + c)^2 + a^3)*sinh(d*x + c)^2 + 8*(a^3*cosh(d*x + c)^7 + 3*a^3*c
osh(d*x + c)^5 + 3*a^3*cosh(d*x + c)^3 + a^3*cosh(d*x + c))*sinh(d*x + c))*log(2*sinh(d*x + c)/(cosh(d*x + c)
- sinh(d*x + c))) + 4*(2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x*cosh(d*x + c)^7 - 3*(3*a*b^2 + 2*b^3 - 2*(a^3 + 3
*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^5 - 2*(6*a*b^2 + 2*b^3 - 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cos
h(d*x + c)^3 - (3*a*b^2 + 2*b^3 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh
(d*x + c)^8 + 8*d*cosh(d*x + c)*sinh(d*x + c)^7 + d*sinh(d*x + c)^8 + 4*d*cosh(d*x + c)^6 + 4*(7*d*cosh(d*x +
c)^2 + d)*sinh(d*x + c)^6 + 8*(7*d*cosh(d*x + c)^3 + 3*d*cosh(d*x + c))*sinh(d*x + c)^5 + 6*d*cosh(d*x + c)^4
+ 2*(35*d*cosh(d*x + c)^4 + 30*d*cosh(d*x + c)^2 + 3*d)*sinh(d*x + c)^4 + 8*(7*d*cosh(d*x + c)^5 + 10*d*cosh(d
*x + c)^3 + 3*d*cosh(d*x + c))*sinh(d*x + c)^3 + 4*d*cosh(d*x + c)^2 + 4*(7*d*cosh(d*x + c)^6 + 15*d*cosh(d*x
+ c)^4 + 9*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^2 + 8*(d*cosh(d*x + c)^7 + 3*d*cosh(d*x + c)^5 + 3*d*cosh(d*x
+ c)^3 + d*cosh(d*x + c))*sinh(d*x + c) + d)

Sympy [F]

\[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{3} \coth {\left (c + d x \right )}\, dx \]

[In]

integrate(coth(d*x+c)*(a+b*tanh(d*x+c)**2)**3,x)

[Out]

Integral((a + b*tanh(c + d*x)**2)**3*coth(c + d*x), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 214 vs. \(2 (68) = 136\).

Time = 0.28 (sec) , antiderivative size = 214, normalized size of antiderivative = 2.97 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=b^{3} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac {4 \, {\left (e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} + 3 \, a b^{2} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {3 \, a^{2} b \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}{d} + \frac {a^{3} \log \left (\sinh \left (d x + c\right )\right )}{d} \]

[In]

integrate(coth(d*x+c)*(a+b*tanh(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

b^3*(x + c/d + log(e^(-2*d*x - 2*c) + 1)/d + 4*(e^(-2*d*x - 2*c) + e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c))/(d*(4*
e^(-2*d*x - 2*c) + 6*e^(-4*d*x - 4*c) + 4*e^(-6*d*x - 6*c) + e^(-8*d*x - 8*c) + 1))) + 3*a*b^2*(x + c/d + log(
e^(-2*d*x - 2*c) + 1)/d + 2*e^(-2*d*x - 2*c)/(d*(2*e^(-2*d*x - 2*c) + e^(-4*d*x - 4*c) + 1))) + 3*a^2*b*log(e^
(d*x + c) + e^(-d*x - c))/d + a^3*log(sinh(d*x + c))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (68) = 136\).

Time = 0.39 (sec) , antiderivative size = 267, normalized size of antiderivative = 3.71 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {2 \, a^{3} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )} - 2\right ) + 2 \, {\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )} + 2\right ) - \frac {9 \, a^{2} b {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )}^{2} + 9 \, a b^{2} {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )}^{2} + 3 \, b^{3} {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )}^{2} + 36 \, a^{2} b {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )} + 12 \, a b^{2} {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )} - 4 \, b^{3} {\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )}\right )} + 36 \, a^{2} b - 12 \, a b^{2} - 4 \, b^{3}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + e^{\left (-2 \, d x - 2 \, c\right )} + 2\right )}^{2}}}{4 \, d} \]

[In]

integrate(coth(d*x+c)*(a+b*tanh(d*x+c)^2)^3,x, algorithm="giac")

[Out]

1/4*(2*a^3*log(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c) - 2) + 2*(3*a^2*b + 3*a*b^2 + b^3)*log(e^(2*d*x + 2*c) + e^(
-2*d*x - 2*c) + 2) - (9*a^2*b*(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c))^2 + 9*a*b^2*(e^(2*d*x + 2*c) + e^(-2*d*x -
2*c))^2 + 3*b^3*(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c))^2 + 36*a^2*b*(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c)) + 12*a*
b^2*(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c)) - 4*b^3*(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c)) + 36*a^2*b - 12*a*b^2 -
4*b^3)/(e^(2*d*x + 2*c) + e^(-2*d*x - 2*c) + 2)^2)/d

Mupad [B] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 380, normalized size of antiderivative = 5.28 \[ \int \coth (c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {\ln \left ({\mathrm {e}}^{4\,c+4\,d\,x}-1\right )\,\left (a^3\,d+d\,\left (3\,a^2\,b+3\,a\,b^2+b^3\right )\right )}{2\,d^2}-x\,{\left (a+b\right )}^3+\frac {2\,\left (2\,b^3+3\,a\,b^2\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {8\,b^3}{d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (b^3\,\sqrt {-d^2}-a^3\,\sqrt {-d^2}+3\,a\,b^2\,\sqrt {-d^2}+3\,a^2\,b\,\sqrt {-d^2}\right )}{d\,\sqrt {a^6-6\,a^5\,b+3\,a^4\,b^2+16\,a^3\,b^3+15\,a^2\,b^4+6\,a\,b^5+b^6}}\right )\,\sqrt {a^6-6\,a^5\,b+3\,a^4\,b^2+16\,a^3\,b^3+15\,a^2\,b^4+6\,a\,b^5+b^6}}{\sqrt {-d^2}}-\frac {2\,\left (4\,b^3+3\,a\,b^2\right )}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {4\,b^3}{d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )} \]

[In]

int(coth(c + d*x)*(a + b*tanh(c + d*x)^2)^3,x)

[Out]

(log(exp(4*c + 4*d*x) - 1)*(a^3*d + d*(3*a*b^2 + 3*a^2*b + b^3)))/(2*d^2) - x*(a + b)^3 + (2*(3*a*b^2 + 2*b^3)
)/(d*(exp(2*c + 2*d*x) + 1)) + (8*b^3)/(d*(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1)) +
(atan((exp(2*c)*exp(2*d*x)*(b^3*(-d^2)^(1/2) - a^3*(-d^2)^(1/2) + 3*a*b^2*(-d^2)^(1/2) + 3*a^2*b*(-d^2)^(1/2))
)/(d*(6*a*b^5 - 6*a^5*b + a^6 + b^6 + 15*a^2*b^4 + 16*a^3*b^3 + 3*a^4*b^2)^(1/2)))*(6*a*b^5 - 6*a^5*b + a^6 +
b^6 + 15*a^2*b^4 + 16*a^3*b^3 + 3*a^4*b^2)^(1/2))/(-d^2)^(1/2) - (2*(3*a*b^2 + 4*b^3))/(d*(2*exp(2*c + 2*d*x)
+ exp(4*c + 4*d*x) + 1)) - (4*b^3)/(d*(4*exp(2*c + 2*d*x) + 6*exp(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c
+ 8*d*x) + 1))